<?xml version="1.0" encoding="UTF-8"?>
<page
        xmlns="http://cloudprint.cainiao.com/print"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://cloudprint.cainiao.com/print
         http://cloudprint-docs-resource.oss-cn-shanghai.aliyuncs.com/lpml_schema.xsd"
        xmlns:editor="http://cloudprint.cainiao.com/schema/editor"
        width="215" height="140" splitable="true">
    <%
    const group = [
    {list: [ {label: "收货人", key: "real_name"},{label: "订单编号", key: "order_id"}]},
    {list: [ {label: "收货地址", key: "user_address"},{label: "支付时间", key: "pay_time"}]},
    {list: [ {label: "手机号", key: "user_phone"},{label: "支付方式", key: "pay_type"}]},
    ]
    %>
    <header>
        <layout left="2" top="2" width="215" orientation="vertical">
            <% for(var i=0;i<group.length;i++){ %>
            <layout orientation="horizontal">
                <% for(var j=0;j<group[i].list.length;j++){ %>
                <layout width="107" height="8">
                    <text style="fontSize:10"><![CDATA[<%=group[i].list[j].label%>：<%=_data.orderInfo[group[i].list[j].key]%>]]></text>
                </layout>
                <%}%>
            </layout>
            <%}%>
        </layout>
    </header>
    <footer height="25">
        <layout top="0" left="2" width="213" orientation="vertical">
            <layout orientation="horizontal" height="8">
                <layout width="30">
                    <text style="fontSize:10;"> <![CDATA[运费：<%=_data.orderInfo.pay_postage%>]]></text>
                </layout>
                <layout width="30">
                    <text style="fontSize:10;"> <![CDATA[优惠：<%=_data.orderInfo.deduction_price%>]]></text>
                </layout>
                <layout width="30">
                    <text style="fontSize:10;"><![CDATA[会员折扣：0]]></text>
                </layout>
                <layout width="30">
                    <text style="fontSize:10;"><![CDATA[积分抵押：<%=_data.orderInfo.deduction_price%>]]></text>
                </layout>
                <layout width="80">
                    <text style="align:right;fontSize:10;"><![CDATA[实付金额：<%=_data.orderInfo.pay_price%>]]></text>
                </layout>
            </layout>
            <layout>
                <text style="fontSize:10;wrap:true">
                    <![CDATA[用户备注: <%=_data.orderInfo.mark%>]]>
                </text>
            </layout>
            <layout height="4">
                <line startX="0" startY="2" endX="210" endY="2" style="lineType:solid" />
            </layout>
            <layout height="9" left="20" width="213" style="align:center">
                <text style="fontFamily:黑体;fontSize:12;align:center">
                    <![CDATA[店铺信息：<%=_data.name%>]]>
                </text>
            </layout>
        </layout>
    </footer>

    <layout left="2" top="2" width="210" orientation="vertical">
        <table width="210">
            <tr>
                <th width="20">
                    <text style="fontSize:10;align:center;"><![CDATA[商品编号]]></text>
                </th>
                <th width="70">
                    <text style="fontSize:10;align:center;"><![CDATA[商品名称]]></text>
                </th>
                <th width="70">
                    <text style="fontSize:10;align:center;"><![CDATA[商品规格]]></text>
                </th>
                <th width="20">
                    <text style="fontSize:10;align:center;"><![CDATA[单价]]></text>
                </th>
                <th width="10">
                    <text style="fontSize:10;align:center;"><![CDATA[数量]]></text>
                </th>
                <th width="20">
                    <text style="fontSize:10;align:center;fontWeight:bold;"><![CDATA[金额]]></text>
                </th>
            </tr>
            <% for(var i=0;i<_data.product.length;i++){ %>
            <tr>
                <td width="20">
                    <text style="fontSize:10;align:center;"> <![CDATA[<%=_data.product[i].code%>]]></text>
                </td>
                <td width="70">
                    <text style="fontSize:10;align:center;"> <![CDATA[<%=_data.product[i].name%>]]></text>
                </td>
                <td width="70">
                    <text style="fontSize:10;align:center;"> <![CDATA[<%=_data.product[i].suk%>]]></text>
                </td>
                <td width="20">
                    <text style="fontSize:10;align:center;"><![CDATA[<%=_data.product[i].unit_price%>]]> </text>
                </td>
                <td width="10">
                    <text style="fontSize:10;align:center;"><![CDATA[<%=_data.product[i].num%>]]> </text>
                </td>
                <td width="20">
                    <text style="fontSize:10;align:center;"><![CDATA[<%=_data.product[i].price%>]]> </text>
                </td>
            </tr>
            <%}%>
        </table>
    </layout>
</page>
